<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>汽车之家论坛</title>
    <link href="css/slide.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="singup/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="css/easydialog.css"/>
    <link rel="stylesheet" type="text/css" href="css/easyui.css">
    <link rel="stylesheet" type="text/css" href="css/icon.css">
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <style>
        .subTitle { width: 70%; float: left; color: black; font-size: 18px; font-weight: bold; margin: 8px 0 8px 20px; }

        .hits { width: 25%; float: right; color: gray; line-height: 35px;}

        .subContents { border-top: 1px solid #cccccc; padding: 8px; }

        .subInfo { width: 20%; min-width: 130px; float: left; text-align: center; }

        .topicContents { width: 79%; float: left; border-left: solid 1px #cccccc; min-height:260px;}

        .subInfoPic { width: 80%; min-width: 120px; }

        .subInfo ul li:first-child { color: #1c8ee5; font-weight: bold; font-size: 14px; }

        .subInfo ul li { line-height: 25px; }

        .topicContentsTitle { border-bottom: 1px solid #ccc; margin-bottom: 18px; font-size: 16px; font-weight: bold; padding: 8px; }

        .topicContentsC { padding: 8px; line-height: 25px;min-height: 150px; }
        .sign{margin: 10px;border-top:1px dashed #cccccc; padding-top: 5px;}
    </style>
</head>
<body>
<script type="text/javascript" charset="utf-8" src="u/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="u/ueditor.all.min.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="u/lang/zh-cn/zh-cn.js"></script>
<div class="top">
    <div class="top_main">
        <div class="logo" onclick="javascript:location.href=&#39;index.php&#39;">我的汽车之家</div>
        <div id="login">登录</div>
        <div class="search">
            <form action="" method="post"><input name="search"><input type="submit" value="论坛搜索" class="btnSearch">
            </form>
        </div>
        <div class="clear"></div>
    </div>
    <div id="banner">
        <div class="slide_container">
            <ul class="rslides rslides1" id="slider">
                <li id="rslides1_s0" class="rslides1_on"
                    style="display: block; float: left; position: relative; opacity: 1; z-index: 2; transition: opacity 1000ms ease-in-out 0s;">
                    <img src="img/banner1.jpg" alt="">
                </li>
                <li id="rslides1_s1" class=""
                    style="float: none; position: absolute; opacity: 0; z-index: 1; display: list-item; transition: opacity 1000ms ease-in-out 0s;">
                    <img src="img/banner2.jpg" alt="">
                </li>
                <li id="rslides1_s2" class=""
                    style="float: none; position: absolute; opacity: 0; z-index: 1; display: list-item; transition: opacity 1000ms ease-in-out 0s;">
                    <img src="img/banner3.jpg" alt="">
                </li>
            </ul>
        </div>
    </div>
    <div class="info">
        <div class="tx"><img src=""></div>
        <div class="personalInfo">
            用户名：<span id="username1"></span><br>昵称：<span id="nickname1"></span><br>注册时间：<span id="singUpDate"></span>
        </div>
        <div class="countInfo">
            发贴数：<span id="total"></span><br>最后发贴时间：<span id="lastPostTime"></span>
        </div>
        <div class="lastInfo">
            最后发贴标题：<span id="lastTitle"></span><br>最后回复时间：<span id="lastReplyTime"></span>
        </div>
    </div>
    <div class="mainContent">
        <div class="subTitle"> </div>
        <div class="hits">点击次数：
            &nbsp;&nbsp;&nbsp;&nbsp;回复次数： </div>
        <div class="clear"></div>
        <div class="subContents">
            <div class="subInfo">
                <ul>
                    <li>版主</li>
                    <li><img class="subInfoPic" src="tx/"</li>
                    <li>注册日期：</li>
                    <li>等级：</li>
                    <li></li>
                </ul>
            </div>
            <div class="topicContents">
                <div class="topicContentsTitle"> 标题</div>
                <div class="topicContentsC">内容</div>
                <div class="sign">用户IP:&nbsp;&nbsp;
                    <a href='delTopic.php?id=".$title['info'][0]['id']."&action=1'>删除本贴</a></div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </div>

        <div class="subContents">
            <div class="subInfo">
                <ul>

                    <li>昵称</li>
                    <li><img class="subInfoPic" src="tx/"</li>
                    <li>注册日期：</li>
                    <li>等级：</li>
                    <li></li>
                </ul>
            </div>
            <div class="topicContents">
                <div class="topicContentsC">
                    <fieldset>
                        <legend>引用回复</legend>
                    </fieldset>
                </div>
                <div class="sign">
                    <b>用户IP：</b>127.0.0.1&nbsp;&nbsp;
                    <a href='delTopic.php?id='>删除本贴</a>&nbsp;&nbsp;&nbsp;<span onclick='quoteReply()'><a href='#editor'>回复TA</a></span>"
                </div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </div>
        <script id="editor" type="text/plain" style="width:100%;height:200px;" ></script>
    </div>
    <div style="width: 80%;margin: 10px auto">
        <div class="count">
        <span class="newPost" onclick="newReply(1);">引用回贴</span>
        <span class="newPost" onclick="newReply(0);" style="margin-right:10px;">直接回贴</span>
        <span class="newPost" onclick="location.href='index.php'">返回首页</span>
        </div>
    </div>
    <div class="bot">版权所有 汽车之家</div>
    <div id="registerForm" class="form_wrapper" style="width: 550px;">
        <form class="register">
            <h3>用户注册</h3>
            <div class="column">
                <div>
                    <label>用户名:</label>
                    <input type="text" name="username" id="username"/>
                    <span class="error">This is an error</span>
                </div>
                <div>
                    <label>昵称:</label>
                    <input type="text" name="nickname" id="nickname"/>
                    <span class="error">This is an error</span>
                </div>
                <div>
                    <label>出生日期:</label>
                    <div class="birthday"><input type="text" name="birthday" id="birthday"/>
                        <span class="error">This is an error</span></div>
                </div>
            </div>
            <div class="column">
                <div>
                    <label>选择头像:</label>
                    <input type="file" name="pic" id="pic"/>
                    <span class="error">This is an error</span>
                </div>
                <div>
                    <label>电子信箱:</label>
                    <input type="text" name="email" id="email"/>
                    <span class="error">This is an error</span>
                </div>
                <div>
                    <label>密码:</label>
                    <input type="password" name="pw" id="pw"/>
                    <span class="error">This is an error</span>
                </div>
            </div>
            <div class="bottom">
                <div class="remember"></div>
                <input type="button" value="注册" onclick="singup();"/>
                <a href="javascript:void(0);" rel="login" class="linkform" id="showLogin">已经有帐号了? 点击登录</a>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </form>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
    <div id="loginFrom" class="form_wrapper">
        <form class="login">
            <h3>用户登录</h3>
            <div>
                <label>用户名:</label>
                <input type="text" id="username2"/>
                <span class="error">This is an error</span>
            </div>
            <div>
                <label>密码: <a href="forgot_password.html" rel="forgot_password"
                              class="forgot linkform">忘记密码?</a></label>
                <input type="password" id="pw2"/>
                <span class="error">This is an error</span>
            </div>
            <div class="bottom">
                <div class="remember"><input type="checkbox" id="rememberMe"/><span>保存登录状态</span></div>
                <input type="button" value="登录" onclick="login();">
                <a href="javascript:void(0);" rel="register" class="linkform" id="showRegister">还没有帐号? 点击注册</a>
                <div class="clear"></div>
            </div>
        </form>
    </div>
    <div class="clear"></div>
    <script src="js/jquery.min.js"></script>
    <script src="js/jquery.form.min.js"></script>
    <script src="js/jquery.easyui.min.js"></script>
    <script src="js/responsiveslides.min.js"></script>
    <script src="js/easydialog.min.js"></script>
    <script src="js/easyui-lang-zh_CN.js"></script>
    <script src="js/site.js"></script>

    <script type="text/javascript">

        //实例化编辑器
        //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
        var ue = UE.getEditor('editor');

        function getContent() {
            if(hasContent()) {
                var lastContents = UE.getEditor('editor').getContent();
                //异步保存发表的贴子
                $.ajax({
                    url:'newReply.php',
                    type:'post',
                    dataType:'json',
                    data:{contents:lastContents,maintopicid:<?php echo $id?>,quoteid:quoteID},
                    success:function (d) {
                        if(d.error == 1){
                            alert(d.errMsg);
                        }
                        else{
                            alert('回贴成功');
                            location.reload();
                        }
                    }
                })
            }
            else{
                alert('你还没有填写内容哦');
                return;
            }
        }
        function hasContent() {
            var result = UE.getEditor('editor').hasContents();
            return result;
        }

    </script>
</body>
</html>